import { ecsclass, EcsComponent } from '../../../../../../../../pkg-export/@gamex/cc-ecs';
import { MyEntity } from '../entity/MyEntity';

@ecsclass('DestroyComponent')
export class DestroyComponent extends EcsComponent<MyEntity> {
    static allowRecycling = true;

    protected onRemove(): void {
        this._killed = false;
    }

    /**
     * 被击杀
     */
    private _killed = false;
    get killed() {
        return this._killed;
    }
    set killed(value: boolean) {
        this._killed = value;
    }
}